package com.shanghai.shanghaielectric.controller;

/**
 * Created by admin on 2018/1/9.
 */

public class ParameterSetController {

    //    public ParameterEntity mParameterEntity;
//    public ParameterEntity mBoardParameterEntity;
    private byte[] mReplyFirstMsg;

    private static ParameterSetController sInstance = new ParameterSetController();

    public static ParameterSetController getInstance() {
        return sInstance;
    }


    /////////////////////////////////////////////////////////////////////
    public enum PassiveComponentType {

        KVAR_240(1, "240kVar", "0001"),
        KVAR_300(2, "300kVar", "0002"),
        KVAR_360(3, "360kVar", "0003");

        public int code;
        public String msg;
        public String data;

        PassiveComponentType(int code, String msg, String data) {
            this.code = code;
            this.msg = msg;
            this.data = data;
        }

        public static PassiveComponentType getEnum(int code) {
            for (PassiveComponentType resultCode : PassiveComponentType.values()) {
                if (resultCode.code == code) {
                    System.out.println("电容组件的类型" + resultCode);
                    return resultCode;//返回对应的枚举量
                }
            }
            return PassiveComponentType.KVAR_300;//默认显示
        }
    }


}

